package com.peas.platform.module.icims.base.auth.adapter.repository.po;

import java.util.*;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 用户功能访问
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_user_visit`")
public class UserVisitPo extends BasePo {

    // 用户表ID
    // （用户表）外键
    @Comment(value = "用户表ID")
    @NotNull(message = "用户表ID不能为空")
    @TableField(value = "`user_id`", jdbcType = JdbcType.BIGINT)
    private Long userId;

    // 标题
    @Comment(value = "标题")
    @Size(max = 100, message = "标题不能超过100个字符")
    @TableField(value = "`title`", jdbcType = JdbcType.VARCHAR)
    private String title;

    // 图标
    @Comment(value = "图标")
    @Size(max = 100, message = "图标不能超过100个字符")
    @TableField(value = "`icon`", jdbcType = JdbcType.VARCHAR)
    private String icon;

    // 名称
    @Comment(value = "名称")
    @Size(max = 100, message = "名称不能超过100个字符")
    @TableField(value = "`name`", jdbcType = JdbcType.VARCHAR)
    private String name;

    // 路径
    @Comment(value = "路径")
    @Size(max = 100, message = "路径不能超过100个字符")
    @TableField(value = "`path`", jdbcType = JdbcType.VARCHAR)
    private String path;

    // 最后访问时间
    @Comment(value = "最后访问时间")
    @TableField(value = "`last_visit_time`", jdbcType = JdbcType.TIMESTAMP)
    private Date lastVisitTime;

    // 访问次数
    @Comment(value = "访问次数")
    @TableField(value = "`click`", jdbcType = JdbcType.INTEGER)
    private Integer click;

}
